package com.beamfield.dao.material;

import com.beamfield.model.Issue;
import com.beamfield.modelVo.IssueDetailVo;
import com.beamfield.modelVo.IssueVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface IssueMapper {
    int deleteByPrimaryKey(Long issue_id);

    int insert(Issue record);

    int insertSelective(Issue record);

    Issue selectByPrimaryKey(Long issue_id);

    int updateByPrimaryKeySelective(Issue record);

    int updateByPrimaryKey(Issue record);

    List<IssueVo> selectCarryDetailByBeamId(@Param("beamId") Long beamId,
                                            @Param("offset") String offset,
                                            @Param("limit") String limit,
                                            @Param("issueName") String issueName);

    long countCarryDetailByBeamId(@Param("beamId") Long beamId,
                                  @Param("issueName") String issueName);

    List<IssueDetailVo> getIusseDetail(@Param("issue_id") Long issue_id);

    long countTodayNew();

    List<IssueVo> selectByBeamIdAndSuppMName(@Param("beamId") Long beamId,
                                             @Param("offset")String offset,
                                             @Param("limit")String limit,
                                             @Param("suppliesMaterialName")String suppliesMaterialName,
                                             @Param("useDep")String useDep);

    List<IssueDetailVo> getIusseDetailAndAlreadyOut(@Param("issueId") long issueId,
                                                    @Param("suppliesMaterialName") String suppliesMaterialName);

    long countByBeamIdAndSuppMName(@Param("beamId") Long beamId,
                                   @Param("suppliesMaterialName")String suppliesMaterialName,
                                   @Param("useDep")String useDep);

    double selectSumNum(@Param("issueId") String issueId,@Param("suppliesId") String suppliesId);

    List<IssueVo> selectByIssueIds(@Param("issueIds") List<String> issueIds);

    IssueVo selectByPrimaryKey2(@Param("issueId") String issueId);
}